home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Networking / TransferProvider / ProviderFactory.h < prev    next >
Encoding:
Text File  |  2000-09-28  |  1.8 KB  |  48 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        ProviderFactory.h
  3.  
  4.     Contains:    Interface to our provider factory library.
  5.  
  6.     Written by: Quinn "The Eskimo!"    
  7.  
  8.     Copyright:    Copyright © 1997-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 7/23/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 
  21.  
  22. */
  23. ////////////////////////////////////////////////////////////
  24. // Pick up general Open Transport stuff.
  25.  
  26. #include <OpenTransport.h>
  27.  
  28. ////////////////////////////////////////////////////////////
  29. // Provider factory definitions.
  30.  
  31. extern OSStatus FactoryCreateEndpoint(EndpointRef *ref, OTClient *currentOwner);
  32.     // This routine creates an endpoint for you, passing back
  33.     // the EndpointRef and the current owner.  You can then
  34.     // call OTTransferProviderOwnership to 
  35.     
  36. ////////////////////////////////////////////////////////////
  37. // Initialisation and termination routines.
  38.  
  39. extern OSStatus InitProviderFactory(void);
  40.     // Call this before calling FactoryCreateEndpoint.
  41.     
  42. extern void CloseProviderFactory(void);
  43.     // Call this after you've created all the endpoints you
  44.     // need from the factory.  Make sure you have transferred
  45.     // the ownership of all these endpoints before calling this,
  46.     // otherwise OT will assume that the factory still owns the
  47.     // endpoints, and clean them up for you!
  48.